﻿using Ongoal.Quotation.Common;
using Ongoal.Quotation.Service.Common;
using Ongoal.Quotation.Service.Model;
using Ongoal.Quotation.Service.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ongoal.Quotation.Service.Interface
{
    /// <summary>
    /// 用户接口
    /// </summary>
    
    public interface IRoleService : IServiceBase
    {
        /// <summary>
        /// 获取角色树
        /// </summary>
        /// <returns></returns>
        object GetTreeRole(string keyword);
        /// <summary>
        /// 添加角色
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        bool AddRole(Role entity);
        /// <summary>
        /// 修改角色
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool UpdateRole(Role model);
        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="listid"></param>
        /// <returns></returns>
        bool deleteRole(List<int> listid);

        /// <summary>
        /// 获取已经授权的用户
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        object GetUserRole(int roleId,string keyword, string orgPost);

        /// <summary>
        /// 获取还没有授权的用户
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        object GetNotUserRole(int roleId, string keyword, string orgPost);

        /// <summary>
        /// 分配用户
        /// </summary>
        /// <param name="uids"></param>
        /// <param name="roleid"></param>
        /// <returns></returns>
        bool AddRoleUser(List<int> uids, int roleid);
        /// <summary>
        /// 移除用户
        /// </summary>
        /// <param name="tids"></param>
        /// <returns></returns>
        bool RemoveRoleUser(List<int> tids);

        /// <summary>
        /// 获取权限树
        /// </summary>
        /// <returns></returns>
        object GetAuthorList(int RoleID);

        /// <summary>
        /// 授权
        /// </summary>
        /// <param name="list"></param>
        /// <param name="RoleID"></param>
        /// <returns></returns>
        object AddAuthor(List<AuthorMenuTree> list, int RoleID);
    }
}
